<template>
  <el-form :inline="true" :model="formInline" class="demo-form-inline">
    <el-form-item label="名字">
      <el-input v-model="formInline.userName" placeholder="请输入"></el-input>
    </el-form-item>
    <el-form-item label="活动场所">
      <el-select v-model="formInline.region" placeholder="请选择">
        <el-option label="东北滑雪" value="dongbei"></el-option>
        <el-option label="杭州游湖" value="hangzhou"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">提交</el-button>
    </el-form-item>
  </el-form>
</template>
<script setup>
import { reactive } from 'vue'
import { useRouter } from 'vue-router'
const formInline = reactive({
  userName: '',
  region: '',
})
const router = useRouter()
const onSubmit = () => {
  console.log('formInline-->', formInline.userName)
  router.push('/')
}
</script>
